import Vue from 'vue'
import Router from 'vue-router'
import Index from '@/components/Index'
import Goods from '@/components/Goods'
import Order from '@/components/Order'
import Car from '@/components/Car'
import GoodsList from '@/components/GoodsList'
import IndexCategory from '@/components/IndexCategory'
import Login from '../components/Login.vue'
import Zhuce from '../components/Zhuce.vue'
import Personal from '../components/Personal.vue'
import layout from '../components/layout.vue'
import PersonalDetail from '../components/PersonalDetail.vue'
import Address from '../components/Address.vue'

Vue.use(Router)

export default new Router({

  routes: [
    {
      path: '/layout',
      name: 'layout',
      component: layout,
      children:[
        {
          path: '/personal',
          name: 'personal',
          component: Personal,
        },
        {
          path: '/personalDetail',
          name: 'personalDetail',
          component: PersonalDetail
        },
        {
          path: '/address',
          name: 'address',
          component: Address
        },
      ]
    },
    {
      path: '/zhuce',
      name: 'zhuce',
      component: Zhuce
    },
    {
      path: '/login',
      name: 'login',
      component: Login
    },
    
    
    {
    path: '/',
    name: 'Index',
    component: Index,
    children: [
      {
        path: '/indexCategory',
        name: 'IndexCategory',
        component: IndexCategory
      }

    ]
  },
  {
    path: '/goods',
    name: 'Goods',
    component: Goods
  },
  {
    path: '/order',
    name: 'Order',
    component: Order
  },
  {
    path: '/car',
    name: 'Car',
    component: Car
  },
  {
    path: '/goodsList',
    name: 'GoodsList',
    component: GoodsList
  }
 ]
})
